<extend name="Public:base"/>

<block name="main">
<script type="text/javascript" src="./Public/js/preview.js"></script>
<style>
#preview{position:absolute;border:1px solid #ccc;background:#333;padding:5px;display:none;color:#fff;}
#preview img{width:200px;height:200px;}
</style>
<div id="yzh-content">

<form name="myform" id="myform" action="" method="post">

<div class="table-list">
  <table class="table">
		<thead>
      <tr>
			<th width="30"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');"></th>
            <th width="40">ID</th>
			<th>邮件地址</th>
			<if condition="$fields['status']"></if>
			<if condition="$fields['hits']"></if>
			<th width="100">{:L('manage')}</th>
            </tr>
        </thead>
      	<tbody>
      		<volist name="list" id="vo" key="k">
      		<tr>
			<td  width="30" align="center"><input class="inputcheckbox " name="ids[]" value="{$vo['id']}" type="checkbox" ></td>
			<td align="center">{$vo['id']}</td>
      		<td><if condition="$vo['catid']">[<font color="green">{$categorys[$vo['catid']]['catname']}</font>]</if> 
			{if $module_name=='Guestbook' || $module_name=='Feedback'}{$vo['username']}-{$vo['title']}{else}<a href="{$vo.url}" <if condition="$vo['title_style']!=''">style ="{$vo['title_style']}"</if> target="_blank">{$vo['title']} </a>{/if}
			
			<if condition="$vo['thumb']!=''"><a href="{$vo['thumb']}" class="preview" title="{$vo['title']}"><img src="./Public/images/admin_image.gif"></a></if>
			<if condition="$vo['posid']!=0"><img src="./Public/images/admin_elite.gif"></if></td>
			<if condition="$fields['status']"></if>
			<if condition="$fields['hits']"> </if>
      		<td align="center"> <a href="javascript:confirm_delete('{:U($module_name.'/delete',array(id=>$vo['id']))}')">{:L('delete')}</a></td>
      		</tr>
      		</volist>
      	</tbody>
    </table>

    <div class="btn"><input type="button" class="btn btn-sm btn-primary" name="dosubmit" value="<?php echo L('delete')?>" onclick="myform.action='{:U($module_name.'/deleteall')}';return confirm_deleteall()"/> 
			
	 </div>
  </div>
</form>

<div id="pages">{$page}</div>

</div>

<script>
$("#catid").attr("value",'{$catid}');
function confirm_deleteall(){
	art.dialog.confirm("{:L('real_delete')}", function(){ $('#myform').submit();});
}
</script>
</block>